﻿@{
    ViewBag.Title = "后台管理系统-登陆";
    Layout = "";
}
<!DOCTYPE html>
<html>
<head>
    <title>管理信息系统</title>
    <script src="~/Content/js/jquery.min.js" type="text/javascript"></script>
    <script src="~/Content/js/plugs/layer/layer.js" type="text/javascript"></script>
    <script src="~/Content/js/bode/bode.js" type="text/javascript"></script>
    <script src="~/Content/js/bode/bode.ajax.js" type="text/javascript"></script>
    <link href="~/Content/css/admin/login.css" rel="stylesheet" />

    <style>
        body {
            background-color: #1c77ac;
            background-image: url(/Content/imgs/admin/light.png);
            background-repeat: no-repeat;
            background-position: center top;
            overflow: hidden;
        }
    </style>
</head>
<body>
    <div id="mainBody">
        <div id="cloud1" class="cloud"></div>
        <div id="cloud2" class="cloud"></div>
    </div>
    <div class="logintop">
        <span>欢迎登录后台管理界面平台</span>
        <ul>
            <li><a href="#">回首页</a></li>
            <li><a href="#">帮助</a></li>
            <li><a href="#">关于</a></li>
        </ul>
    </div>
    <div class="loginbody">
        <span class="systemlogo"></span>
        <div class="loginbox">
            <form action="@Url.Action("Login","Account")" method="post"></form>
            <ul>
                <li><input id="userName" class="loginuser" type="text" placeholder="用户名" /></li>
                <li><input id="password" class="loginpwd" type="password" placeholder="密码" /></li>
                <li><input id="btSubmit" type="submit" class="loginbtn" value="登录" /><label><input name="" type="checkbox" value="" checked="checked" />记住密码</label><label><a href="#">忘记密码？</a></label></li>
            </ul>
        </div>
    </div>
    <div class="loginbm">版权所有  @DateTime.Now.Year  <a href=""></a></div>
    <script src="~/Content/js/admin/cloud.js" type="text/javascript"></script>

    <script type="text/javascript">
    $(function () {
        $('.loginbox').css({ 'position': 'absolute', 'left': ($(window).width() - 692) / 2 });
        $(window).resize(function () {
            $('.loginbox').css({ 'position': 'absolute', 'left': ($(window).width() - 692) / 2 });
        });

        $("#btSubmit").click(function () {
            var dto = {
                userName: $("#userName").val(),
                password: $("#password").val()
            };
            $.bode.ajax("/api/Account/Authenticate", dto, function (token) {
                $.bode.auth.login(token);
                location.href = "/Admin/Home/Index";
            });
            return false;
        });
    });
    </script>
</body>
</html>


